Tree descriptions can be produced by macros. This is especially useful
for trees which belong to a larger class of trees and which can be specified
by some simple parameters. A small library of such
macros is provided in the file TreeClasses.tex
.
\treesymbol{<node options>}
:
\lvls{<number>}
and \slnt{<number>}
are provided. \lvls
defines the number of levels in the
tree over which the triangle extends, and \slnt
gives
the slant of the sides of the triangle, ranging from 1 (minimal)
to 24 (maximal). On the other hand,
\treesymbol
does not expand to a tree description, because
a tree symbol cannot be built from subtrees, and, on the other hand,
it is not a node, because it is allowed to extend over several tree
levels and therefore has a longer contour than an ordinary node.
\binary{<bin specification>}
:
<bin specification>
consists of the
following options:
\no{<number>}
defines the number of internal nodes,
with <number>
greater than 0, and
\squareleaves
produces leaves of type
square
. Defaults are \no{1}
and
leaves of type circle
.
fibonacci{<fib specification>}
:
<fib specification>
allows for the three options
\hght{<number>}
, \unarynodes
,
and \squareleaves
.
Normally, a Fibonacci tree of height h + 2 is a binary tree
with Fibonacci trees of height h and h + 1 as left and
right subtrees. The option \unarynodes
means that the
Fibonacci tree is augmented by unary nodes such that each
two subtree siblings have the same height. These are examples
of what has been called brother-trees in the literature;
see [12]. Defaults are
\hght{0}
, the unaugmented version of a Fibonacci tree,
and external nodes of type circle
.